//
//  CollectionViewCellFactory.m
//  OneDay
//
//  Created by lanou on 16/4/20.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "CollectionViewCellFactory.h"

@implementation CollectionViewCellFactory

+ (BaseCollectionViewCell *)cellWithModelClass:(Class)modelClass collectinView:(UICollectionView *)collection index:(NSIndexPath *)indexPath {
    // 将 model 的类名用来作为 Cell 的重用标志符
    NSString *identifier = NSStringFromClass(modelClass);
    // 从重用池中取出 Cell
    BaseCollectionViewCell *cell = [collection dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
    return cell;
}

@end
